package third;

import java.util.Scanner;

public class third_29 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("Enter circle1's center x-, y-coordinates, and radius: ");
        double c1x, c1y, c1r, c2x, c2y, c2r;
        c1x = input.nextDouble();
        c1y = input.nextDouble();
        c1r = input.nextDouble();
        System.out.print("Enter circle2's center x-, y-coordinates, and radius: ");
        c2x = input.nextDouble();
        c2y = input.nextDouble();
        c2r = input.nextDouble();

        double ans = Math.sqrt((c1x-c2x)*(c1x-c2x)+(c1y-c2y)*(c1y-c2y));
        if(ans<=c1r-c2r) {
            System.out.println("circle2 is inside circle1");
        }
        else if(ans<c1r+c2r) {
            System.out.println("circle2 overlaps circle1");
        }
        else {
            System.out.println("circle2 does not overlap circle1");
        }

    }

}



